<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.jimet.process.*"%>
<%@page import="java.util.Vector" %>
<%@page import="com.jimet.process.HeaderPageParam.HeaderPageButton"%>
<%@ include file="./webUserAuthenticatedPageStart.jsp" %>
<%
String pgIx			= request.getParameter("pgIx")!=null ? request.getParameter("pgIx"):"";
String pg			= request.getParameter("pg")!=null ? request.getParameter("pg"):"";

Vector<HeaderPageButton> pageButtonsVect	= null;
String strPgHeader		= "Hatalı Yönlendirme !";
String strButtonTxt		= "";
String strButtonPgIx	= "";
String strButtonClass	= "";
String strButtonActRoot	= headerPageController.getButtonActRoot(pg);


HeaderPageParam pageParam	= headerPageController.getHeaderPage(pg,pgIx);
if ( pageParam != null && ( juser == null || pageAuthController.isUserAuthorizedForPage(juser,pg,pgIx)) )
{
	strPgHeader		= pageParam.getPageHeader();
	pageButtonsVect	= pageParam.getPageButtons();
}

%>

<%if ( pageButtonsVect != null ) {%>
    <div class="page_header_links pull-right">
<%	for ( int i = 0 ; i<pageButtonsVect.size(); i++ ){
		strButtonTxt	= pageButtonsVect.get(i).getPageButtonText();
		strButtonPgIx	= pageButtonsVect.get(i).getPageRedirectIx();
		strButtonClass 	= pageButtonsVect.get(i).getPageButtonClass() != null ? pageButtonsVect.get(i).getPageButtonClass() : "";
		strButtonActRoot	= headerPageController.getButtonActRoot(pg);
%>
<% 		if ( strButtonTxt.contains("yeni") ||  strButtonClass.equals("addButton") ) { %>		
		<a style="margin-top:0px;" class="m-btn green mini" href="<%=JimetConfiguration.getString("APPLICATION.URL")%><%=strButtonActRoot%>/<%=strButtonPgIx%>/<%=tokenKey%>">
			<i class="icon-plus icon-white"></i> <%=strButtonTxt%>
		</a>
<%		} else if ( strButtonTxt.contains("geri") ) { %>
		<a style="margin-top:0px;" class="m-btn red mini" href="<%=JimetConfiguration.getString("APPLICATION.URL")%><%=strButtonActRoot%>/<%=strButtonPgIx%>/<%=tokenKey%>">
			<i class="icon-arrow-left icon-white"></i> <%=strButtonTxt%>
		</a>
<%		} else if ( !strButtonTxt.equals("") ){ %>
		<a style="margin-top:0px;" class="m-btn mini" href="<%=JimetConfiguration.getString("APPLICATION.URL")%><%=strButtonActRoot%>/<%=strButtonPgIx%>/<%=tokenKey%>">
			<i class="icon-chevron-right icon-white"></i> <%=strButtonTxt%>
		</a>
<%		}	
	}
%>
	</div>
<%
}
%>
<h1><%=strPgHeader.toUpperCase(new Locale("tr","TR"))%></h1>